<template>
  <div>
    <el-container style="height: 100vh;">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu router :default-openeds="['1']" :default-active="$route.path">
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-tickets"></i>题目分类
            </template>
            <el-menu-item-group>
              <template slot="title">分类</template>
              <el-menu-item index="/admin/category/create">新建分类</el-menu-item>
              <el-menu-item index="/admin/category/list">分类列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-message"></i>題目管理
            </template>
            <el-menu-item-group>
              <template slot="title">选择题</template>
              <el-menu-item index="/admin/choiceQuestion/create">选择题录入</el-menu-item>
              <el-menu-item index="/admin/choiceQuestion/list">选择题列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-setting"></i>文件管理
            </template>
            <el-menu-item-group>
              <template slot="title">文件管理</template>
              <el-menu-item index="/admin/filePage/create">上传文件</el-menu-item>
              <el-menu-item index="/admin/filePage/list">查看文件</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-menu"></i>管理员列表
            </template>
            <el-menu-item-group>
              <template slot="title">管理员信息</template>
              <el-menu-item index="/admin/adminInfo/create">新建管理员</el-menu-item>
              <el-menu-item index="/admin/adminInfo/list">管理员列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>

      <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <el-dropdown>
            <i class="el-icon-setting" style="margin-right: 15px"></i>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>查看</el-dropdown-item>
              <el-dropdown-item>新增</el-dropdown-item>
              <el-dropdown-item>删除</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <span>admin</span>
        </el-header>

        <el-main>
          <router-view></router-view>
          <!-- <el-table :data="tableData">
            <el-table-column prop="date" label="日期" width="140"></el-table-column>
            <el-table-column prop="name" label="姓名" width="120"></el-table-column>
            <el-table-column prop="address" label="地址"></el-table-column>
          </el-table>-->
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  //   data () {
  //     const item = {
  //       date: '2016-05-02',
  //       name: '王小虎',
  //       address: '上海市普陀区金沙江路 1518 弄'
  //     }
  //     return {
  //       tableData: Array(20).fill(item)
  //     }
  //   }
}
</script>

<style>
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>
